<template>
  <section>
    <div class="question-title">{{xcform_base_xctitle.value}}
      <div class="required" v-if="xcform_prop_required.value==true">(*)</div>
      <i class="el el-icon-view" v-if="xcform_prop_hidden.value===false"></i>
    </div>
    <div>
      <el-select v-model="value" :placeholder="xcform_base_placeholder.value"
        v-if="xcform_base_property_input_select.type=='select'">
        <el-option v-for="item in xcform_base_inputoptions.options" :key="item.value" :label="item.value"
          :value="item.value">
        </el-option>
      </el-select>
      <el-radio-group v-model="xcform_base_defaultvalue.value" v-if="xcform_base_property_input_select.type=='radio'">
        <el-radio v-for="item in xcform_base_inputoptions.options" :key="item.value" :label="item.value">{{item.value}}</el-radio>
      </el-radio-group>
    </div>
  </section>

</template>

<script>
  export default {
    props: {
      xcform_base_inputfieldcode: {
        type: Object
      },
      xcform_base_xctitle: {
        type: Object
      },
      xcform_base_property_input_select: {
        type: Object
      },
      xcform_base_inputoptions: {
        type: Object
      },
      xcform_base_defaultvalue: {
        type: Object
      },
      xcform_base_placeholder: {
        type: Object
      },
      xcform_prop_required: {
        type: Object
      },
      xcform_prop_readonly: {
        type: Object
      },
      xcform_prop_hidden: {
        type: Object
      },
      xcform_layout_span: {
        type: Object
      },
    },
    data() {
      return {
        value:null,
      }
    },
    mounted() {
      let that = this;
      that.value = that.xcform_base_defaultvalue.value;
    },
    destroyed() {

    },
    methods: {

    }
  }
</script>
<style>
  .el{
    padding-left: 10px;
  }
</style>
